﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace CSharpIrcBot
{
    public partial class Dialog : Form
    {

        public string Result
        {
            get { return txtBox.Text; }
        }

        public Dialog(string Message, string Title)
        {
            InitializeComponent();
            this.Text = Title;
            this.lblQuestion.Text = Message;
        }

        private void btnOk_Click( object sender, EventArgs e )
        {
            if( !string.IsNullOrEmpty( Result ))
            {
                DialogResult = DialogResult.OK;
                this.Close();
            }
        }

        private void btnCancel_Click( object sender, EventArgs e )
        {
            this.DialogResult = DialogResult.Cancel;
            this.Close();
        }
    }
}
